import request from '@/utils/request'
/**
 *
 * 学院管理
 *
 **/
export function getColleges() {
  return request({
    url: '/college',
    method: 'get'
  })
}
 //分页查询
 export const getCollege = (params: any) =>
  request({
    'url': `/college/page`,
    'method': 'get',
    params
  })
 
 
    //新增学院
 export const addCollege = (params: any) =>
  request({
    'url': '/college',
    'method': 'post',
    data:params
  })

    //根据id查询学院
 export const findCollegeById = (id: number) =>
  request({
    'url': `/college/${id}`,
    'method': 'get',
  })

      //更新学院
 export const updateCollege = (params: any) =>
  request({
    'url': '/college',
    'method': 'put',
    data:params
  })
  export const deleteBatchColleges = (ids: number[]) =>
    request({
      'url': `/college`,
      'method': 'delete',
      params: { 
        ids: ids.join(',') // 将数组转换为逗号分隔的字符串
      }
    })